package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.RoomMapper;
import com.ruoyi.system.domain.Room;
import com.ruoyi.system.service.IRoomService;
import com.ruoyi.common.core.text.Convert;

/**
 * 房间信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-04-15
 */
@Service
public class RoomServiceImpl implements IRoomService 
{
    @Autowired
    private RoomMapper roomMapper;

    /**
     * 查询房间信息
     * 
     * @param roomId 房间信息ID
     * @return 房间信息
     */
    @Override
    public Room selectRoomById(Integer roomId)
    {
        return roomMapper.selectRoomById(roomId);
    }

    /**
     * 查询房间信息列表
     * 
     * @param room 房间信息
     * @return 房间信息
     */
    @Override
    public List<Room> selectRoomList(Room room)
    {
        return roomMapper.selectRoomList(room);
    }

    /**
     * 新增房间信息
     * 
     * @param room 房间信息
     * @return 结果
     */
    @Override
    public int insertRoom(Room room)
    {
        return roomMapper.insertRoom(room);
    }

    /**
     * 修改房间信息
     * 
     * @param room 房间信息
     * @return 结果
     */
    @Override
    public int updateRoom(Room room)
    {
        return roomMapper.updateRoom(room);
    }

    /**
     * 删除房间信息对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteRoomByIds(String ids)
    {
        return roomMapper.deleteRoomByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除房间信息信息
     * 
     * @param roomId 房间信息ID
     * @return 结果
     */
    @Override
    public int deleteRoomById(Integer roomId)
    {
        return roomMapper.deleteRoomById(roomId);
    }
}
